<!DOCTYPE html>
<html style="height: 100%">
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../css/bmapofcovid.css" />
    <script type="text/javascript" src="../js/echarts.min.js"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=YlXQQV2RRptaQRQV3C913T9SPKisMVDB"></script>
    <script type="text/javascript" src="../js/bmap.min.js"></script>
    <title>全国疫情信息</title>
  </head>

  <body style="height: 100%; margin: 0">
    <div style="height: 41px">
      <ul class="nav nav-tabs">
        <li role="presentation"><a href="index.html">首页</a></li>
  				<li role="presentation"><a href="humanRelation.html">移动个体时空接触网络分析</a></li>
  				<li role="presentation"><a href="mapOfCovid.html">疫情分布状况分析</a></li>
  				<li role="presentation"><a href="bmapOfCovid.html">移动个体轨迹追踪分析</a></li>
				 <li role="presentation"><a href="predict.html">疫情传播预测</a></li>
      </ul>
    </div>
    <div id="container" style="height: calc(100% - 41px)"></div>
    <div style="position: absolute; top: 70px; left: 9px">
      <input oninput="search()" placeholder="请输入姓名"/>
      <div id="list" style="margin: 0px 2px; position: absolute; top: 31px">
        <div class="card">
          <div class="card-list"></div>
        </div>
      </div>
    </div>

    <script type="text/javascript">
      //搜索
      let showCard = false;
      let cardDom = document.getElementsByClassName('card')[0];
      function onSearch(e) {
        if (!showCard) {
          showCard = true;
          cardDom.style.display = 'block';
        }
        if (e == '') {
          showCard = false;
          cardDom.style.display = 'none';
          myChart.setOption(option);
          bmap = myChart.getModel().getComponent('bmap').getBMap();
          bmap.addControl(new BMap.NavigationControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT })); // 添加平移缩放控件
          bmap.addControl(new BMap.ScaleControl()); // 添加比例尺控件
          bmap.addControl(new BMap.MapTypeControl()); //添加地图类型控件
        }
      }

      let listDom = document.getElementsByClassName('card-list')[0];
      let peopleData = {
        张三: {
          name: '张三',
          age: 28,
          phone: 13888888888,
          id: '110102200201012215',
          address: '深圳市张三张三张三张三张三张三张三张三张三张三',
        },
        李四: {
          name: '李四',
          age: 30,
          phone: 13888888888,
          id: '100102200201012215',
          address: '深圳市李四李四李四李四李四李四李四李四李四李四',
        },
        王五: {
          name: '王五',
          age: 30,
          phone: 13888888888,
          id: '100102200201012215',
          address: '深圳市王五王五王五王五王五王五王五王五王五王五',
        },
        赵六: {
          name: '赵六',
          age: 30,
          phone: 13888888888,
          id: '100102200201012215',
          address: '深圳市赵六赵六赵六赵六赵六赵六赵六赵六赵六赵六',
        },
      };

      function search() {
        let e = document.getElementsByTagName('input')[0].value;
        onSearch(e);

        let info = peopleData[e];
        if (info == undefined) {
          listDom.innerHTML = '';
          return;
        }

        listDom.innerHTML = `
        <div class="card-list-head">
          <div><span>姓名：</span><span class="card-list-text">${info.name}</span></div>
          <div><span>年龄：</span><span class="card-list-text">${info.age}</span></div>
          <div><span>手机号：</span><span class="card-list-text">${info.phone}</span></div>
          <div><span>身份证：</span><span class="card-list-text">${info.id}</span></div>
          <div><span>家庭住址：</span><span class="card-list-text">${info.address}</span></div>
          <div id="loc" style="text-align: right;"><button style="width: 100%;" >查看轨迹</button></div>
        </div>`;

        document.getElementById('loc').addEventListener('click', () => {
          loc(info.name);
        });
      }

      //loc
      let line = [];
      let polyline;
      //张三 李四 有轨迹数据
      let peopleLatLngData = {
        张三: [
          {
            lng: 114.054278,
            lat: 22.544657,
          },
          {
            lng: 114.056705,
            lat: 22.544652,
          },
          {
            lng: 114.058811,
            lat: 22.544676,
          },
          {
            lng: 114.062059,
            lat: 22.544751,
          },
          {
            lng: 114.067724,
            lat: 22.545236,
          },
          {
            lng: 114.068013,
            lat: 22.545989,
          },
          {
            lng: 114.068013,
            lat: 22.549616,
          },
          {
            lng: 114.076575,
            lat: 22.548328,
          },
        ],
        李四: [
          {
            lng: 114.068013,
            lat: 22.549616,
          },
          {
            lng: 114.067927,
            lat: 22.540956,
          },
          {
            lng: 114.062955,
            lat: 22.540369,
          },
          {
            lng: 114.061921,
            lat: 22.53488,
          },
        ],
      };
      let selectName;

      let peopleColor = { 张三: '#e9626d', 李四: '#0000fe' };
      function loc(e) {
        if (peopleLatLngData[e] == undefined) {
          alert(`没有${e}的轨迹`);
          return;
        }

        myChart.setOption({}, true);

        line = [];
        peopleLatLngData[e].forEach((v) => {
          line.push(new BMap.Point(v.lng, v.lat));
        });

        polyline = new BMap.Polyline(line, { strokeColor: peopleColor[e], strokeWeight: 20 });
        bmap.addOverlay(polyline);

        selectName = e;
        replay();
      }

      let replayIndex = 0;
      function replay() {
        if (replayIndex == line.length - 1) {
          replayIndex = 0;
          flag = false;
          if (selectName == '张三') {
            alert('检测到接触!');
            document.getElementsByTagName('input')[0].value = '李四';
            search();
            loc('李四');
          }
          return;
        }
        setTimeout(() => {
          draw(line[replayIndex]);
          replay();
          replayIndex++;
        }, 500);
      }

      //绘制轨迹
      let flag = false;
    let carMk;
    function draw(e) {
      if (!flag) {
        bmap.centerAndZoom(new BMap.Point(e.lng, e.lat), 17);
        bmap.removeOverlay(carMk);
        carMk = new BMap.Marker(new BMap.Point(e.lng, e.lat));
        bmap.addOverlay(carMk);
        flag = true;
      }

      bmap.panTo(new BMap.Point(e.lng, e.lat));
      carMk.setPosition(new BMap.Point(e.lng, e.lat));
    }

      //散点图
      let myChart = echarts.init(document.getElementById('container'));
      let mapData = [
      	{
      		name:'新疆',
      		value:[43.45,87.36,51],
      	},
        {
          name: '武汉',
          value: [114.31, 30.52, 50340],
        },
        {
          name: '荆州',
          value: [112.239741, 30.335165, 1580],
        },
        {
          name: '上海',
          value: [121.48, 31.22, 982],
        },
        {
          name: '北京',
          value: [116.46, 39.92, 936],
        },
        {
          name: '宜昌',
          value: [111.3, 30.7, 931],
        },
        {
          name: '乌鲁木齐',
          value: [87.68, 43.77, 845],
        },
        {
          name: '重庆',
          value: [106.54, 29.59, 584],
        },
        {
          name: '温州',
          value: [120.65, 28.01, 504],
        },
        {
          name: '深圳',
          value: [114.07, 22.62, 471],
        },
        {
          name: '深圳',
          value: [114.07, 22.62, 423],
        },
        {
          name: '广州',
          value: [113.23, 23.16, 377],
        },
        {
          name: '哈尔滨',
          value: [126.63, 45.75, 264],
        },
        {
          name: '济宁',
          value: [116.59, 35.38, 260],
        },
        {
          name: '长沙',
          value: [113, 28.21, 242],
        },
        {
          name: '天津',
          value: [117.2, 39.13, 240],
        },
        {
          name: '南昌',
          value: [115.89, 28.68, 230],
        },
        {
          name: '杭州',
          value: [120.19, 30.26, 181],
        },
        {
          name: '合肥',
          value: [117.27, 31.86, 174],
        },
        {
          name: '宁波',
          value: [121.56, 29.86, 157],
        },
        {
          name: '吉林',
          value: [126.57, 43.87, 157],
        },
        {
          name: '郑州',
          value: [113.65, 34.76, 157],
        },
        {
          name: '岳阳',
          value: [113.09, 29.37, 156],
        },
        {
          name: '台州',
          value: [121.420757, 28.656386, 147],
        },
        {
          name: '成都',
          value: [104.06, 30.67, 145],
        },
        {
          name: '西安',
          value: [108.95, 34.27, 120],
        },
        {
          name: '德州',
          value: [116.29, 37.45, 120],
        },
        {
          name: '九江',
          value: [115.97, 29.71, 116],
        },
        {
          name: '大连',
          value: [121.62, 38.92, 110],
        },
        {
          name: '东莞',
          value: [113.75, 23.04, 98],
        },
        {
          name: '珠海',
          value: [113.52, 22.3, 98],
        },
        {
          name: '南京',
          value: [118.78, 32.04, 93],
        },
        {
          name: '佛山',
          value: [113.11, 23.05, 89],
        },
        {
          name: '苏州',
          value: [120.62, 31.32, 87],
        },
        {
          name: '南山',
          value: [113.93029, 22.53291, 87],
        },
        {
          name: '福田',
          value: [114.05541, 22.52245, 83],
        },
        {
          name: '常德',
          value: [111.69, 29.05, 82],
        },
        {
          name: '株洲',
          value: [113.16, 27.83, 80],
        },
        {
          name: '徐州',
          value: [117.2, 34.26, 79],
        },
        {
          name: '句容',
          value: [119.16, 31.95, 75],
        },
        {
          name: '福州',
          value: [119.3, 26.08, 71],
        },
        {
          name: '龙岗',
          value: [114.24771, 22.71986, 71],
        },
        {
          name: '中山',
          value: [113.38, 22.52, 67],
        },
        {
          name: '淮安',
          value: [119.15, 33.5, 66],
        },
        {
          name: '青岛',
          value: [120.33, 36.07, 65],
        },
        {
          name: '宝安',
          value: [113.88311, 22.55371, 63],
        },
        {
          name: '惠州',
          value: [114.4, 23.09, 62],
        },
        {
          name: '唐山',
          value: [118.02, 39.63, 58],
        },
        {
          name: '平顶山',
          value: [113.29, 33.75, 58],
        },
        {
          name: '南宁',
          value: [108.33, 22.84, 55],
        },
        {
          name: '三亚',
          value: [109.511909, 18.252847, 55],
        },
        {
          name: '无锡',
          value: [120.29, 31.59, 55],
        },
        {
          name: '金华',
          value: [119.64, 29.12, 55],
        },
        {
          name: '昆明',
          value: [102.73, 25.04, 53],
        },
        {
          name: '安阳',
          value: [114.35, 36.1, 53],
        },
        {
          name: '常州',
          value: [119.95, 31.79, 51],
        },
        {
          name: '溧阳',
          value: [119.48, 31.43, 51],
        },
        {
          name: '沧州',
          value: [116.83, 38.33, 49],
        },
        {
          name: '临沂',
          value: [118.35, 35.05, 49],
        },
        {
          name: '连云港',
          value: [119.16, 34.59, 48],
        },
        {
          name: '泉州',
          value: [118.58, 24.93, 47],
        },
        {
          name: '烟台',
          value: [121.39, 37.52, 47],
        },
        {
          name: '济南',
          value: [117, 36.65, 47],
        },
        {
          name: '嘉兴',
          value: [120.76, 30.77, 46],
        },
        {
          name: '长春',
          value: [125.35, 43.88, 45],
        },
        {
          name: '寿光',
          value: [118.73, 36.86, 44],
        },
        {
          name: '北海',
          value: [109.12, 21.49, 44],
        },
        {
          name: '潍坊',
          value: [119.1, 36.62, 44],
        },
        {
          name: '齐齐哈尔',
          value: [123.97, 47.33, 43],
        },
        {
          name: '张家口',
          value: [114.87, 40.82, 43],
        },
        {
          name: '绍兴',
          value: [120.58, 30.01, 42],
        },
        {
          name: '诸暨',
          value: [120.23, 29.71, 42],
        },
        {
          name: '南通',
          value: [121.05, 32.08, 40],
        },
        {
          name: '海口',
          value: [110.35, 20.02, 39],
        },
        {
          name: '南充',
          value: [106.110698, 30.837793, 39],
        },
        {
          name: '文登',
          value: [122.05, 37.2, 38],
        },
        {
          name: '威海',
          value: [122.1, 37.5, 38],
        },
        {
          name: '马鞍山',
          value: [118.48, 31.56, 38],
        },
        {
          name: '聊城',
          value: [115.97, 36.45, 38],
        },
        {
          name: '泰州',
          value: [119.9, 32.49, 37],
        },
        {
          name: '兰州',
          value: [103.73, 36.03, 37],
        },
        {
          name: '贵阳',
          value: [106.71, 26.57, 36],
        },
        {
          name: '湘潭',
          value: [112.91, 27.87, 36],
        },
        {
          name: '厦门',
          value: [118.1, 24.46, 35],
        },
        {
          name: '泰安',
          value: [117.13, 36.18, 35],
        },
        {
          name: '沈阳',
          value: [123.38, 41.8, 34],
        },
        {
          name: '银川',
          value: [106.27, 38.47, 34],
        },
        {
          name: '芜湖',
          value: [118.38, 31.33, 34],
        },
        {
          name: '保定',
          value: [115.48, 38.85, 34],
        },
        {
          name: '龙华',
          value: [114.036585, 22.68695, 34],
        },
        {
          name: '桂林',
          value: [110.28, 25.29, 32],
        },
        {
          name: '遵义',
          value: [106.9, 27.7, 32],
        },
        {
          name: '焦作',
          value: [113.21, 35.24, 32],
        },
        {
          name: '邯郸',
          value: [114.47, 36.6, 32],
        },
        {
          name: '廊坊',
          value: [116.7, 39.53, 32],
        },
        {
          name: '罗湖',
          value: [114.13116, 22.54836, 32],
        },
        {
          name: '洛阳',
          value: [112.44, 34.7, 31],
        },
        {
          name: '淄博',
          value: [118.05, 36.78, 30],
        },
        {
          name: '石家庄',
          value: [114.48, 38.03, 29],
        },
        {
          name: '盐城',
          value: [120.13, 33.38, 27],
        },
        {
          name: '大庆',
          value: [125.03, 46.58, 27],
        },
        {
          name: '开封',
          value: [114.35, 34.79, 26],
        },
        {
          name: '汕头',
          value: [116.69, 23.39, 25],
        },
        {
          name: '牡丹江',
          value: [129.58, 44.6, 25],
        },
        {
          name: '柳州',
          value: [109.4, 24.33, 24],
        },
        {
          name: '泸州',
          value: [105.39, 28.91, 24],
        },
        {
          name: '金坛',
          value: [119.56, 31.74, 24],
        },
        {
          name: '枣庄',
          value: [117.57, 34.86, 24],
        },
        {
          name: '江门',
          value: [113.06, 22.61, 23],
        },
        {
          name: '扬州',
          value: [119.42, 32.39, 23],
        },
        {
          name: '邢台',
          value: [114.48, 37.05, 23],
        },
        {
          name: '湛江',
          value: [110.359377, 21.270708, 22],
        },
        {
          name: '绵阳',
          value: [104.73, 31.48, 22],
        },
        {
          name: '太原',
          value: [112.53, 37.87, 21],
        },
        {
          name: '昆山',
          value: [120.95, 31.39, 19],
        },
        {
          name: '肇庆',
          value: [112.44, 23.05, 19],
        },
        {
          name: '德阳',
          value: [104.37, 31.13, 18],
        },
        {
          name: '菏泽',
          value: [115.480656, 35.23375, 18],
        },
        {
          name: '咸阳',
          value: [108.72, 34.36, 17],
        },
        {
          name: '丽水',
          value: [119.92, 28.45, 17],
        },
        {
          name: '日照',
          value: [119.46, 35.42, 16],
        },
        {
          name: '梅州',
          value: [116.1, 24.55, 16],
        },
        {
          name: '攀枝花',
          value: [101.718637, 26.582347, 16],
        },
        {
          name: '义乌',
          value: [120.06, 29.32, 16],
        },
        {
          name: '西宁',
          value: [101.74, 36.56, 15],
        },
        {
          name: '滨州',
          value: [118.03, 37.36, 15],
        },
        {
          name: '渭南',
          value: [109.5, 34.52, 15],
        },
        {
          name: '玉溪',
          value: [102.52, 24.35, 14],
        },
        {
          name: '茂名',
          value: [110.88, 21.68, 14],
        },
        {
          name: '阳江',
          value: [111.95, 21.85, 14],
        },
        {
          name: '衢州',
          value: [118.88, 28.97, 14],
        },
        {
          name: '曲靖',
          value: [103.79, 25.51, 13],
        },
        {
          name: '宿迁',
          value: [118.3, 33.96, 13],
        },
        {
          name: '宝鸡',
          value: [107.15, 34.38, 13],
        },
        {
          name: '葫芦岛',
          value: [120.836932, 40.711052, 12],
        },
        {
          name: '清远',
          value: [113.01, 23.7, 12],
        },
        {
          name: '锦州',
          value: [121.15, 41.13, 12],
        },
        {
          name: '宜宾',
          value: [104.56, 29.77, 12],
        },
        {
          name: '大同',
          value: [113.3, 40.12, 12],
        },
        {
          name: '镇江',
          value: [119.44, 32.2, 12],
        },
        {
          name: '鄂尔多斯',
          value: [109.781327, 39.608266, 11],
        },
        {
          name: '丹东',
          value: [124.37, 40.13, 11],
        },
        {
          name: '盘锦',
          value: [122.070714, 41.119997, 11],
        },
        {
          name: '包头',
          value: [110, 40.58, 11],
        },
        {
          name: '光明',
          value: [113.896026, 22.777292, 11],
        },
        {
          name: '舟山',
          value: [122.207216, 29.985295, 10],
        },
        {
          name: '湖州',
          value: [120.1, 30.86, 10],
        },
        {
          name: '揭阳',
          value: [116.35, 23.55, 10],
        },
        {
          name: '韶关',
          value: [113.62, 24.84, 10],
        },
        {
          name: '吴江',
          value: [120.63, 31.16, 10],
        },
        {
          name: '秦皇岛',
          value: [119.57, 39.95, 10],
        },
        {
          name: '赤峰',
          value: [118.87, 42.28, 9],
        },
        {
          name: '自贡',
          value: [104.778442, 29.33903, 9],
        },
        {
          name: '乳山',
          value: [121.52, 36.89, 8],
        },
        {
          name: '即墨',
          value: [120.45, 36.38, 8],
        },
        {
          name: '延安',
          value: [109.47, 36.6, 8],
        },
        {
          name: '长治',
          value: [113.08, 36.18, 8],
        },
        {
          name: '铜川',
          value: [109.11, 35.09, 8],
        },
        {
          name: '衡水',
          value: [115.72, 37.72, 8],
        },
        {
          name: '承德',
          value: [117.93, 40.97, 7],
        },
        {
          name: '潮州',
          value: [116.63, 23.68, 7],
        },
        {
          name: '三门峡',
          value: [111.19, 34.76, 7],
        },
        {
          name: '呼和浩特',
          value: [111.65, 40.82, 7],
        },
        {
          name: '坪山',
          value: [114.34637, 22.680529, 7],
        },
        {
          name: '海门',
          value: [121.15, 31.89, 6],
        },
        {
          name: '招远',
          value: [120.38, 37.35, 6],
        },
        {
          name: '汕尾',
          value: [115.375279, 22.786211, 6],
        },
        {
          name: '蓬莱',
          value: [120.75, 37.8, 6],
        },
        {
          name: '盐田',
          value: [114.23733, 22.5578, 6],
        },
        {
          name: '胶南',
          value: [119.97, 35.88, 5],
        },
        {
          name: '河源',
          value: [114.68, 23.73, 5],
        },
        {
          name: '胶州',
          value: [120.03336, 36.264622, 5],
        },
        {
          name: '张家界',
          value: [110.479191, 29.117096, 5],
        },
        {
          name: '临安',
          value: [119.72, 30.23, 5],
        },
        {
          name: '富阳',
          value: [119.95, 30.07, 5],
        },
        {
          name: '阳泉',
          value: [113.57, 37.85, 4],
        },
        {
          name: '常熟',
          value: [120.74, 31.64, 4],
        },
        {
          name: '平度',
          value: [119.97, 36.77, 4],
        },
        {
          name: '宜兴',
          value: [119.82, 31.36, 4],
        },
        {
          name: '鞍山',
          value: [122.85, 41.12, 4],
        },
        {
          name: '莱西',
          value: [120.53, 36.86, 3],
        },
        {
          name: '太仓',
          value: [121.1, 31.45, 3],
        },
        {
          name: '江阴',
          value: [120.26, 31.91, 3],
        },
        {
          name: '本溪',
          value: [123.73, 41.3, 3],
        },
        {
          name: '莱州',
          value: [119.942327, 37.177017, 2],
        },
        {
          name: '临汾',
          value: [111.5, 36.08, 2],
        },
        {
          name: '大鹏',
          value: [114.479901, 22.587862, 2],
        },
        {
          name: '金昌',
          value: [102.188043, 38.520089, 1],
        },
        {
          name: '拉萨',
          value: [91.11, 29.97, 1],
        },
        {
          name: '抚顺',
          value: [123.97, 41.97, 1],
        },
        {
          name: '荣成',
          value: [122.41, 37.16, 1],
        },
        {
          name: '营口',
          value: [122.18, 40.65, 1],
        },
        {
          name: '章丘',
          value: [117.53, 36.72, 1],
        },
        {
          name: '石嘴山',
          value: [106.39, 39.04, 1],
        },
        {
          name: '张家港',
          value: [120.555821, 31.875428, 1],
        },
        {
          name: '云浮',
          value: [112.02, 22.93, 0],
        },
        {
          name: '瓦房店',
          value: [121.979603, 39.627114, 0],
        },
        {
          name: '嘉峪关',
          value: [98.289152, 39.77313, 0],
        },
        {
          name: '东营',
          value: [118.49, 37.46, 0],
        },
        {
          name: '克拉玛依',
          value: [84.77, 45.59, 0],
        },
        {
          name: '库尔勒',
          value: [86.06, 41.68, 0],
        },
        {
          name: '莱芜',
          value: [117.67, 36.19, 0],
        },
        {
        name: '罗湖站',
        value: [114.125506, 22.538737, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '国贸站',
        value: [114.125156, 22.546055, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '老街',
        value: [114.12279, 22.550541, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '大剧院站',
        value: [114.114665, 22.547497, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '科学馆站',
        value: [114.10135, 22.546727, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '华强路站',
        value: [114.09171, 22.546355, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '岗厦站',
        value: [114.074582, 22.540606, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '会展中心站',
        value: [114.067617, 22.540433, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '购物公园站',
        value: [114.060557, 22.540344, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '香蜜湖站',
        value: [114.045221, 22.544666, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '车公庙站',
        value: [114.031788, 22.542264, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '竹子林站',
        value: [114.020418, 22.539593, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '侨城东站',
        value: [114.003193, 22.538687, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '华侨城站',
        value: [113.991722, 22.539709, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '世界之窗站',
        value: [113.9807, 22.54297, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '白石洲',
        value: [113.973369, 22.545597, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '高新园',
        value: [113.960423, 22.546036, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '深圳大学',
        value: [113.950339, 22.54387, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '桃园',
        value: [113.931322, 22.538089, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '大新',
        value: [113.921714, 22.538102, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '鲤鱼门',
        value: [113.921714, 22.538102, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '前海湾',
        value: [113.904589, 22.543344, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '新安',
        value: [113.900884, 22.553961, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '宝安中心',
        value: [113.89366, 22.560863, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '宝体',
        value: [113.887784, 22.566541, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '坪洲',
        value: [113.877227, 22.575276, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '西乡',
        value: [113.869117, 22.581735, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '固戍',
        value: [113.853605, 22.606691, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '后瑞',
        value: [113.842017, 22.634498, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '机场东',
        value: [113.829331, 22.652745, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '赤湾',
        value: [113.903968, 22.485549, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '蛇口港',
        value: [113.91868, 22.482611, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '海上世界',
        value: [113.92165, 22.491116, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '水湾',
        value: [113.926332, 22.494305, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '东角头',
        value: [113.93766, 22.491948, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '湾厦',
        value: [113.945309, 22.499072, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '海月',
        value: [113.944315, 22.505611, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '登良',
        value: [113.944351, 22.514873, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '后海',
        value: [113.947799, 22.523707, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '科苑',
        value: [113.953068, 22.532669, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '红树湾',
        value: [113.975165, 22.531056, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '侨城北',
        value: [113.995854, 22.55044, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '深康',
        value: [114.005578, 22.552827, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '安托山',
        value: [114.01258, 22.55486, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '侨香',
        value: [114.020839, 22.555923, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '香蜜',
        value: [114.030401, 22.558783, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '香梅北',
        value: [114.03999, 22.559543, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '景田',
        value: [114.050218, 22.559168, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '莲花西',
        value: [114.056213, 22.552613, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '福田',
        value: [114.06056, 22.545452, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '市民中心',
        value: [114.067844, 22.546784, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '岗厦北',
        value: [114.075828, 22.546339, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '华强北',
        value: [114.092502, 22.55025, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '燕南',
        value: [114.099457, 22.550493, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '湖贝',
        value: [114.13172, 22.550606, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '黄贝岭',
        value: [114.143367, 22.552417, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '新秀站',
        value: [114.155465, 22.553694, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '益田',
        value: [114.057855, 22.522028, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '石厦',
        value: [114.060176, 22.529065, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '少年宫',
        value: [114.067165, 22.554048, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '莲花村',
        value: [114.074565, 22.554351, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '华新',
        value: [114.093207, 22.554929, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '通新岭',
        value: [114.10283, 22.555197, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '红岭',
        value: [114.110284, 22.55533, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '晒布',
        value: [114.129198, 22.555693, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '翠竹',
        value: [114.13658, 22.562715, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '田贝',
        value: [114.136542, 22.573667, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '水贝',
        value: [114.131395, 22.580491, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '草埔',
        value: [114.131395, 22.580491, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '布吉',
        value: [114.128021, 22.608064, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '木棉湾',
        value: [114.13689, 22.613364, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '大芬',
        value: [114.144802, 22.620315, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '丹竹头',
        value: [114.154575, 22.62573, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '六约',
        value: [114.187297, 22.639974, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '塘坑',
        value: [114.19933, 22.644989, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '横岗',
        value: [114.215408, 22.654411, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '永湖',
        value: [114.224473, 22.664994, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '荷坳',
        value: [114.230757, 22.67937, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '大运',
        value: [114.234626, 22.692106, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '爱联',
        value: [114.240824, 22.703949, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '吉祥',
        value: [114.25087, 22.71603, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '龙城广场',
        value: [114.260976, 22.723223, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '南联',
        value: [114.272256, 22.728113, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '双龙',
        value: [114.284105, 22.734723, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '清湖',
        value: [114.0431, 22.669994, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '龙华',
        value: [114.029074, 22.657913, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '龙胜',
        value: [114.018852, 22.651062, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '上塘',
        value: [114.019211, 22.6432, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '红山',
        value: [114.029983, 22.627983, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '深圳北站',
        value: [114.036937, 22.616579, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '白石龙',
        value: [114.049182, 22.607264, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '民乐',
        value: [114.055133, 22.600182, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '上梅林',
        value: [114.066329, 22.57516, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '莲花北',
        value: [114.065874, 22.566216, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '福民',
        value: [114.071399, 22.52887, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '福田口岸',
        value: [114.075674, 22.521591, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '怡景',
        value: [114.146592, 22.56203, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '太安',
        value: [114.143513, 22.579521, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '布心',
        value: [114.144521, 22.587239, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '百鸽笼',
        value: [114.136855, 22.601728, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '长龙',
        value: [114.120431, 22.614274, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '下水径',
        value: [114.117164, 22.62123, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '上水径',
        value: [114.111884, 22.627942, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '杨美',
        value: [114.086573, 22.632635, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '坂田',
        value: [114.077406, 22.633264, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '五和',
        value: [114.067352, 22.632603, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '民治',
        value: [114.047419, 22.623458, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '长岭陂',
        value: [114.016794, 22.605556, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '塘朗',
        value: [114.006482, 22.596454, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '大学城',
        value: [113.972166, 22.588416, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '西丽',
        value: [113.960285, 22.586456, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '留仙洞',
        value: [113.950414, 22.586133, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '兴东',
        value: [113.925339, 22.587479, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '洪浪北',
        value: [113.917157, 22.580576, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '灵芝',
        value: [113.910988, 22.5754, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '翻身',
        value: [113.899729, 22.56601, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '宝华',
        value: [113.891434, 22.556037, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '临海',
        value: [113.89546, 22.550138, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '宝安中心换乘站点',
        value: [113.89366, 22.560863, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '前海湾换乘站点',
        value: [113.904589, 22.543344, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '世界之窗站换乘站点',
        value: [113.9807, 22.54297, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '会展中心站换乘站点',
        value: [114.067617, 22.540433, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '购物公园站换乘站点',
        value: [114.060557, 22.540344, 10],
        symbol: 'image://../images/car.png',
      },
      {
        name: '老街换乘站点',
        value: [114.12279, 22.550541, 10],
        symbol: 'image://../images/car.png',
      },
       {
        name: '大剧院站换乘站点',
        value: [114.114665, 22.547497, 10],
        symbol: 'image://../images/car.png',
      },
      ];
      let option = {
        title: {
          text: '全国主要城市疫情信息',
          left: 'center',
        },
        tooltip: {
          trigger: 'item',
        },
        bmap: {
          center: [114.0163944, 22.6196126],
          zoom: 12,
          roam: true,
        },
        series: [
          {
            name: 'COVID-19',
            type: 'scatter',
            coordinateSystem: 'bmap',
            data: mapData,
            symbolSize: function (val) {
              if (val[2] > 1000) {
                return val[2] / 500;
              } else if (val[2] < 100) {
                return 12;
              } else {
                return val[2] / 10;
              }
            },
            encode: {
              value: 2,
            },
            label: {
              formatter: '{b}',
              position: 'right',
              show: false,
            },
            itemStyle: {
              color: 'purple',
            },
            emphasis: {
              label: {
                show: true,
              },
            },
          },
        ],
      };
      myChart.setOption(option);

      window.onresize = () => {
        myChart.resize();
      };

      //地图
      let bmap = myChart.getModel().getComponent('bmap').getBMap();
      bmap.addControl(new BMap.NavigationControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT })); // 添加平移缩放控件
      bmap.addControl(new BMap.ScaleControl()); // 添加比例尺控件
      bmap.addControl(new BMap.MapTypeControl()); //添加地图类型控件
      var menu = new BMap.ContextMenu();
      var txtMenuItem = [
        {
          text: '放大一级',
          callback: function () {
            bmap.zoomIn();
          },
        },
        {
          text: '缩小一级',
          callback: function () {
            bmap.zoomOut();
          },
        },
      ];
      for (var i = 0; i < txtMenuItem.length; i++) {
        menu.addItem(new BMap.MenuItem(txtMenuItem[i].text, txtMenuItem[i].callback, 100));
      }
      bmap.addContextMenu(menu);
    </script>
  </body>
</html>
